﻿using System.Collections;
using System.Collections.Generic;
using System.Data;

namespace Unis.RuleBase.IFace
{
    public interface IBaseRule : IBaseQueryRule
    {
        // Methods
        int AddToCache(int dataInDocType, object entity, bool isDelete, string[] propertys);

        bool CheckValueIsExists(int dataInDocType, object entity, string[] checkPropertys);
        
        object CreateNewEntity(int dataInDocType);
       
        IList CreateNewEntityBatch(int dataInDocType, int createCount);
       
        int DeletedImmediate(int dataInDocType, object key);
     
        int Flush();

        string GetCreateNewEntityId();
       
        List<string> GetCreateNewEntityIds(int count);

        object GetObjectByKey(int dataInDocType, object keyValue);

        object RefreshEntity(int dataInDocType, object entity);
     
        int SaveDataSetImmediate(DataSet dsData, int dataInDocType);

        int Submit(object entity, bool cancelSubmit);
    }
}
